package com.divine.wn.car.admin.common;

import java.util.ArrayList;

public class StrutsFormList extends ArrayList{

	private static final long serialVersionUID = -500617682918021108L;
	private Class itemClass;     
     
	    public StrutsFormList(Class itemClass) {     
	        this.itemClass = itemClass;     
	    }     
	         
	    public Object get(int index) {     
	        try {     
	            while (index >= size()) {     
	                add(itemClass.newInstance());     
	            }     
	        } catch (Exception e) {     
	            e.printStackTrace();     
	        }     
	        return super.get(index);     
	    }     
}
